
	<h1>Home</h1>

	<!--<strong>Reminder</strong><br />
	If you have lent any of your movies since your last login don't forget to mark them as borrowed!<br /><br />-->
	<strong>Browse By Genre</strong>
	<table width="100%" cellspacing="2" cellpadding="5">
		<tr>
		{foreach from=$genres item=g name=genres}
			<td bgcolor="{cycle values="white,#CFCFCF"}"><a href="index.php?what=movie&amp;do=browse&amp;id={$g.id}">{$g.name}</a> ({$g.movie_count})</td>
			{if $smarty.foreach.genres.iteration % 4 == 0 && !$smarty.foreach.genres.last}{cycle values="white,#CFCFCF" print=false}</tr><tr>{/if}
		{/foreach}
		</tr>
	</table>
	<br />

	<ul id="wtabs">
		<li><a id="t_recently_added" href="#">Recently Added</a></li>
		<li><a id="t_now_available" href="#">Now Available</a></li>
		<!--<li><a id="t_borrow_requests" href="#">Borrow Requests</a></li>
		<li><a id="t_borrowed" href="#">Borrowed</a></li>
		<li><a id="t_borrowing" href="#">Borrowing</a></li>-->
	</ul>

	<div class="wpages" id="recently_added">
		<table class="data_table" width="100%" cellpadding="5" cellspacing="1">
			<tr class="data_table_header">
				<td colspan="4">Movies recently added from IMDB</td>
			</tr>
			{if $content.recent}
			{foreach from=$content.recent item=movie}
				<tr class="{cycle values="data_table_row_1,data_table_row_2"}">
					<td><a title="{$movie.title}" href="index.php?what=movie&amp;do=view&amp;id={$movie.id}">{$movie.title}</a> ({$movie.year})</td>
					<td>{imdb url=$movie.imdb_url}</td>
					{if $movie.own}
						<td align="center" title="{$movie.title} is already in your collection">+</td>
					{else}
						<td align="center"><a title="Add '{$movie.title}' to your movie collection" href="index.php?what=mymovies&amp;do=add&amp;id={$movie.id}">+</a></td>
					{/if}
					{if $movie.own || $movie.wishlist}
						<td align="center" title="{$movie.title} is already in your wishlist or collection">+</td>
					{else}
						<td align="center"><a title="Add '{$movie.title}' to your wishlist" href="index.php?what=wishlist&amp;do=add&amp;id={$movie.id}">+</a></td>
					{/if}
				</tr>
			{/foreach}
			{else}
				<tr>
					<td colspan="4" align="center">No movies in database.</td>
				</tr>
			{/if}
		</table>
	</div>

	<div class="wpages" id="now_available">
		<table class="data_table" width="100%" cellpadding="5" cellspacing="0">
			<tr>
				<th colspan="2">Movies from your wishlist that other members currently own</th>
			</tr>
			{if $content.wishlist}
			{foreach from=$content.wishlist item=movie}
				<tr class="{cycle values="data_table_row_1,data_table_row_2"}">
					<td><a href="index.php?what=movie&amp;do=view&amp;id={$movie.id}">{$movie.title}</a> ({$movie.year})</td>
					<td><!--Request Borrow--></td>
				</tr>
			{/foreach}
			{else}
				<tr>
					<td colspan="4" align="center">No movie in your wishlist is currently available.</td>
				</tr>
			{/if}
		</table>
	</div>

	<!--<div class="wpages" id="borrow_requests">
		<table class="data_table" width="100%" cellpadding="5" cellspacing="1">
			<tr class="data_table_header">
				<td colspan="4">Borrow Requests From Other Members</td>
			</tr>
			{if $content.borrow_requests}
			{foreach from=$content.borrow_requests item=br}
				<tr class="{cycle values="data_table_row_1,data_table_row_2"}">
					<td><a title="{$br.title}" href="index.php?what=movie&amp;do=view&amp;id={$br.id}">{$br.title}</a> ({$br.year})</td>
					<td>{$br.member_username}</td>
					<td align="right">{$br.requested|date:$config.date_format_long}</td>
					<td align="right">Approve | Reject | Mark As Borrowed</td>
				</tr>
			{/foreach}
			{else}
				<tr>
					<td colspan="4" align="center">You have no requests from other members to borrow your movies</td>
				</tr>
			{/if}
		</table>
		<table class="data_table" width="100%" cellpadding="5" cellspacing="1">
			<tr class="data_table_header">
				<td colspan="4">Your Borrow Requests</td>
			</tr>
			{if $content.borrow_requestssssssssssss}
			{foreach from=$content.borrow_requests item=br}
				<tr class="{cycle values="data_table_row_1,data_table_row_2"}">
					<td><a title="{$br.title}" href="index.php?what=movie&amp;do=view&amp;id={$br.id}">{$br.title}</a> ({$br.year})</td>
					<td>{$br.member_username}</td>
				</tr>
			{/foreach}
			{else}
				<tr>
					<td colspan="4" align="center">You have not sent any requests to other members.</td>
				</tr>
			{/if}
		</table>
	</div>

	<div class="wpages" id="borrowed">
		<table class="data_table" width="100%" cellpadding="5" cellspacing="1">
			<tr class="data_table_header">
				<td colspan="4">Your movies that are currently being borrowed by other members</td>
			</tr>
			{if $content.borrowed}
			{foreach from=$content.borrowed item=movie}
				<tr class="{cycle values="data_table_row_1,data_table_row_2"}">
					<td><a title="{$movie.title}" href="index.php?what=movie&amp;do=view&amp;id={$movie.id}">{$movie.title}</a> ({$movie.year})</td>
					<td>{imdb url=$movie.imdb_url}</td>
					{if $movie.own}
						<td align="center" title="{$movie.title} is already in your collection">+</td>
					{else}
						<td align="center"><a title="Add '{$movie.title}' to your movie collection" href="index.php?what=mymovies&amp;do=add&amp;id={$movie.id}">+</a></td>
					{/if}
					{if $movie.own || $movie.wishlist}
						<td align="center" title="{$movie.title} is already in your wishlist or collection">+</td>
					{else}
						<td align="center"><a title="Add '{$movie.title}' to your wishlist" href="index.php?what=wishlist&amp;do=add&amp;id={$movie.id}">+</a></td>
					{/if}
				</tr>
			{/foreach}
			{else}
				<tr>
					<td colspan="4" align="center">No movies in your collection are currently being borrowed.</td>
				</tr>
			{/if}
		</table>
	</div>

	<div class="wpages" id="borrowing">
		<table class="data_table" width="100%" cellpadding="5" cellspacing="1">
			<tr>
				<th colspan="4">You are currently borrowing</th>
			</tr>
			{if $content.borrowing}
			{foreach from=$content.borrowing item=movie}
				<tr class="{cycle values="data_table_row_1,data_table_row_2"}">
					<td><a href="index.php?what=movie&amp;do=view&amp;id={$movie.id}">{$movie.title}</a> ({$movie.year})</td>
				</tr>
			{/foreach}
			{else}
				<tr>
					<td colspan="4" align="center">You are currently borrowing 0 movies from other members</td>
				</tr>
			{/if}
		</table>
	</div>-->

	<script type="text/javascript" language="javascript">window.onload = start_menu;//launch_help();</script>